package com.gy.spring.mvc.service.impl;

import com.gy.spring.mvc.entity.User;
import com.gy.spring.mvc.mapper.UserMapper;
import com.gy.spring.mvc.service.UserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author geYang
 * @since 2018-03-08
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void test() throws Exception {
        User user = new User();
        user.setId(3);
        user.setNickname("ccc");
        user.setMoney(100);
        insert(user);
        int i = 1 / 0;
        System.out.println(i);
    }

    @Override
    public List<User> listUser() {
        return userMapper.listUser();
    }

}
